package zelix.hack.hacks;

import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import zelix.hack.Hack;
import zelix.hack.HackCategory;
import zelix.managers.HackManager;
import zelix.utils.Wrapper;
import zelix.utils.hooks.visual.ChatUtils;
import zelix.value.NumberValue;

public class HighJump extends Hack {

    NumberValue High;
    Minecraft mc = Wrapper.INSTANCE.mc();

    public HighJump(){
        super("HighJump" , HackCategory.MOVEMENT);
        this.High = new NumberValue("Height" , 2D, 1.1D, 10D);
        this.addValue(High);
    }

    @Override
    public void onEnable(){
        super.onEnable();
    }

    @Override
    public void onDisable() {
        super.onDisable();
    }

    @Override
    public void onPlayerTick(TickEvent.PlayerTickEvent e){

        if (mc.player.hurtTime > 0 && mc.player.onGround){
            mc.player.motionY += 0.42F * High.value.floatValue();
            ChatUtils.message("[AutoDisable] HighJump");
            HackManager.getHack("HighJump").toggle();
        }

         super.onPlayerTick(e);
    }
}
